<template>
  <div class="content">
    <div class="all2"></div>

    <div class="acenter">
      <LImage class="image" :style="{width:width, height:height}"
      :src="config.img(image ? image : images[type])"></LImage>
    </div>
    
    <text v-if="!text" class="font30 text3 tCenter">{{T(texts[type])}}</text>
    <text v-else-if="typeof text == 'string'" class="font30 text3 tCenter">{{T(text)}}</text>
    <template v-else>
      <text v-for="(item, index) in text" :key="index" 
      class="font30 text3 tCenter mb5">{{item}}</text>
    </template>

    <slot></slot>

    <div class="all3"></div>
  </div>
</template>

<style src="@/_css/style.css" ></style>
<style scoped>
.content {
  position: absolute;

  flex-direction: column;
  align-items: center;
  justify-content: center;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding-left: 40px;
  padding-right: 40px;
}
.image {
  margin-bottom: 50px;
}
.mb5 {
  margin-bottom: 5px;
}
</style>

<script>

//功能
import config from "@/_js/config";
export default {

  //外部传参数
  props:{
    text:String||Array,
    image:String,
    width:{
      type:Number,
      default:283,
    },
    height:{
      type:Number,
      default:238,
    },
    type:{
      type:String,
      default:'noData',
    },
  },

  //变量
  data() {
    return {
      config:config,
      texts:{'noData':'暂无数据'},
      images:{'noData':'list_kong.png'},
    };
  },

  //释放前
  beforeDestroy() {
  },

  //渲染前
  created() {
  },


  //方法
  methods: {
  },
};
</script>
